﻿using FHJFPro.Base;
using FHJFPro.Const;
using FHJFPro.UserInfos;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FHJFPro.Controllers
{
    /// <summary>
    /// 用户管理
    /// </summary>
    [Authorize]
    [ApiController]
    [Route("api/[controller]")]
    [ApiExplorerSettings(GroupName = GroupingAPI.GroupName_v1)]
    public class UserInfoController : FHJFProController
    {
        private readonly IUserInfoService _userInfoService;
        public UserInfoController(IUserInfoService userInfoService)
        {
            _userInfoService = userInfoService;
        }
        /// <summary>
        /// 新增用户
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("CreateUserInfo")]
        public async Task<ResponseResult<UserInfoDto>> DescribeCheckWarningSummary( [FromBody]CreateUserInfoDto input)
        {
            return await _userInfoService.CreateAsync(input);
        }
    }

}
